package com.gooluke.mall.common.dto;

/**
 * @author gooluke
 */
public class PageInfo {
    private int currentPage = 1;
    private int pageSize = 10;
    private int totalPage;
    private int totalCount;

    public PageInfo() {
    }

    public PageInfo(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public boolean hasNextPage() {
        return this.totalPage != 0 && this.totalPage > this.currentPage;
    }

    public void nextPage() {
        ++this.currentPage;
    }

    public int getCurrentPage() {
        return this.currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return this.totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalCount() {
        return this.totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
}
